

import { request } from 'umi';

interface Data {
  adminSystemUrl?: string;
  systemFavicon?: string;
  systemFooterInfo?: string;
  systemLogo?: string;
  systemTitle?: string;
  systemUrl?: string;
  page?: number;
  pageSize?: number;
  seoDesc?: string;
  seoKeyword?: string;
  i18n?: string;
  oss?: string;
  baiduAnalyticsId?: string;
  googleAnalyticsId?: string;
  smtpFromUser?: string;
  smtpHost?: string;
  smtpPass?: string;
  smtpPort?: string;
  smtpUser?: string;
}

// 系统设置接口
export const getvisit = (data: Data) => {
  return request(`/api/setting`, {
    method: 'POST',
    data: data,
    skipErrorHandler: true,
  });
};
//获取设置配置

export const getsystem = () => {
  return request(`/api/setting/get`, {
    method: 'post',
    skipErrorHandler: true,
  });
};
export const setsystem = (obj: any) => {
  return request(`/api/setting`, {
    method: 'post',
    data: obj,
    skipErrorHandler: true,
  });
};